package ru.osu.acm.testing.beans;

/**
 * User: Integra
 * Date: 31.08.2009
 * Time: 16:19:10
 */
public class MonitorItem implements Comparable<MonitorItem>{
    private int id;
    private int place;
    private String name;
    private String[] results;
    private int total;
    private long time;

    public int compareTo(MonitorItem o) {
        if (total<o.total) return 1;
        if (total>o.total) return -1;
        if (time >o.time) return 1;
        if (time <o.time) return -1;
        return 0;
    }

    public MonitorItem(int id,int place, String name, String[] results, int total, long time) {
        this.id=id;
        this.place = place;
        this.name = name;
        this.results = results;
        this.total = total;
        this.time = time;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPlace() {
        return place;
    }

    public void setPlace(int place) {
        this.place = place;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String[] getResults() {
        return results;
    }

    public void setResults(String[] results) {
        this.results = results;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }
}
